package com.ten.feign;

import com.ten.common.core.entity.AclPermission;
import com.ten.common.core.entity.AclUser;
import com.ten.common.core.entity.TbMember;
import com.ten.common.core.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author ：Q大侠
 * @date ：Created in 2022/12/1 19:13
 * @description：调用远程微服务-education-system
 * @modified By：
 * @version:
 */
@FeignClient(value = "education-system")
public interface SystemFeign {
    @GetMapping("/system/user/getByModile/{modile}")
    TbMember getByModile(@PathVariable String modile);
    /** 
     * @create by:  Q大侠
     * @description: 根据账户查询用户信息 
     * @create time: 2022/12/1 19:22
      * @param username
     * @return  Result<XxxxDO>
     */
    @GetMapping("/system/user/getByName/{username}")
    Result<AclUser> getByName(@PathVariable String username);

    /** 
     * @create by:  Q大侠
     * @description: 根据用户id查询对应的权限 
     * @create time: 2022/12/1 22:56
      * @param userid 
     * @return  
     */
    @GetMapping("/system/permission/getByUserid/{userid}")
    Result<List<AclPermission>> getByUserid(@PathVariable String userid);
}
